home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2005 October / PCWOCT05.iso / Software / FromTheMag / XAMPP 1.4.14 / xampp-win32-1.4.14-installer.exe / xampp / apache / conf / ssl.default.conf < prev   
Text File  |  2005-02-16  |  11KB  |  247 lines

  1. #
  2. # This is the Apache server configuration file providing SSL support.
  3. # It contains the configuration directives to instruct the server how to
  4. # serve pages over an https connection. For detailing information about these 
  5. # directives see <URL:http://httpd.apache.org/docs-2.0/mod/mod_ssl.html>
  6. # Do NOT simply read the instructions in here without understanding
  7. # what they do.  They're here only as hints or reminders.  If you are unsure
  8. # consult the online docs. You have been warned.  
  9. #
  10.  
  11. #
  12. # Pseudo Random Number Generator (PRNG):
  13. # Configure one or more sources to seed the PRNG of the SSL library.
  14. # The seed data should be of good random quality.
  15. # WARNING! On some platforms /dev/random blocks if not enough entropy
  16. # is available. This means you then cannot use the /dev/random device
  17. # because it would lead to very long connection times (as long as
  18. # it requires to make more entropy available). But usually those
  19. # platforms additionally provide a /dev/urandom device which doesn't
  20. # block. So, if available, use this one instead. Read the mod_ssl User
  21. # Manual for more details.
  22. #
  23. # Note: This must come before the <IfDefine SSL> container to support
  24. #       starting without SSL on platforms with no /dev/random equivalent
  25. #       but a statically compiled-in mod_ssl.
  26. #
  27. SSLRandomSeed startup builtin
  28. SSLRandomSeed connect builtin
  29. #SSLRandomSeed startup file:/dev/random  512
  30. #SSLRandomSeed startup file:/dev/urandom 512
  31. #SSLRandomSeed connect file:/dev/random  512
  32. #SSLRandomSeed connect file:/dev/urandom 512
  33.  
  34. <IfDefine SSL>
  35.  
  36. #
  37. # When we also provide SSL we have to listen to the 
  38. # standard HTTP port (see above) and to the HTTPS port
  39. #
  40. # Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
  41. #       Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"
  42. #
  43. Listen 443
  44.  
  45. ##
  46. ##  SSL Global Context
  47. ##
  48. ##  All SSL configuration in this context applies both to
  49. ##  the main server and all SSL-enabled virtual hosts.
  50. ##
  51.  
  52. #
  53. #   Some MIME-types for downloading Certificates and CRLs
  54. #
  55. AddType application/x-x509-ca-cert .crt
  56. AddType application/x-pkcs7-crl    .crl
  57.  
  58. #   Pass Phrase Dialog:
  59. #   Configure the pass phrase gathering process.
  60. #   The filtering dialog program (`builtin' is a internal
  61. #   terminal dialog) has to provide the pass phrase on stdout.
  62. SSLPassPhraseDialog  builtin
  63.  
  64. #   Inter-Process Session Cache:
  65. #   Configure the SSL Session Cache: First the mechanism 
  66. #   to use and second the expiring timeout (in seconds).
  67. #SSLSessionCache        none
  68. #SSLSessionCache        shmht:logs/ssl_scache(512000)
  69. #SSLSessionCache        shmcb:logs/ssl_scache(512000)
  70. SSLSessionCache         dbm:logs/ssl_scache
  71. SSLSessionCacheTimeout  300
  72.  
  73. #   Semaphore:
  74. #   Configure the path to the mutual exclusion semaphore the
  75. #   SSL engine uses internally for inter-process synchronization. 
  76. SSLMutex  file:logs/ssl_mutex
  77.  
  78. ##
  79. ## SSL Virtual Host Context
  80. ##
  81.  
  82. <VirtualHost _default_:443>
  83.  
  84. #   General setup for the virtual host
  85. DocumentRoot "O:/apache/htdocs"
  86. ServerName www.example.com:443
  87. ServerAdmin you@example.com
  88. ErrorLog logs/error_log
  89. TransferLog logs/access_log
  90.  
  91. #   SSL Engine Switch:
  92. #   Enable/Disable SSL for this virtual host.
  93. SSLEngine on
  94.  
  95. #   SSL Cipher Suite:
  96. #   List the ciphers that the client is permitted to negotiate.
  97. #   See the mod_ssl documentation for a complete list.
  98. SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
  99.  
  100. #   Server Certificate:
  101. #   Point SSLCertificateFile at a PEM encoded certificate.  If
  102. #   the certificate is encrypted, then you will be prompted for a
  103. #   pass phrase.  Note that a kill -HUP will prompt again.  Keep
  104. #   in mind that if you have both an RSA and a DSA certificate you
  105. #   can configure both in parallel (to also allow the use of DSA
  106. #   ciphers, etc.)
  107. SSLCertificateFile conf/ssl.crt/server.crt
  108. #SSLCertificateFile conf/ssl.crt/server-dsa.crt
  109.  
  110. #   Server Private Key:
  111. #   If the key is not combined with the certificate, use this
  112. #   directive to point at the key file.  Keep in mind that if
  113. #   you've both a RSA and a DSA private key you can configure
  114. #   both in parallel (to also allow the use of DSA ciphers, etc.)
  115. SSLCertificateKeyFile conf/ssl.key/server.key
  116. #SSLCertificateKeyFile conf/ssl.key/server-dsa.key
  117.  
  118. #   Server Certificate Chain:
  119. #   Point SSLCertificateChainFile at a file containing the
  120. #   concatenation of PEM encoded CA certificates which form the
  121. #   certificate chain for the server certificate. Alternatively
  122. #   the referenced file can be the same as SSLCertificateFile
  123. #   when the CA certificates are directly appended to the server
  124. #   certificate for convinience.
  125. #SSLCertificateChainFile conf/ssl.crt/ca.crt
  126.  
  127. #   Certificate Authority (CA):
  128. #   Set the CA certificate verification path where to find CA
  129. #   certificates for client authentication or alternatively one
  130. #   huge file containing all of them (file must be PEM encoded)
  131. #   Note: Inside SSLCACertificatePath you need hash symlinks
  132. #         to point to the certificate files. Use the provided
  133. #         Makefile to update the hash symlinks after changes.
  134. #SSLCACertificatePath conf/ssl.crt
  135. #SSLCACertificateFile conf/ssl.crt/ca-bundle.crt
  136.  
  137. #   Certificate Revocation Lists (CRL):
  138. #   Set the CA revocation path where to find CA CRLs for client
  139. #   authentication or alternatively one huge file containing all
  140. #   of them (file must be PEM encoded)
  141. #   Note: Inside SSLCARevocationPath you need hash symlinks
  142. #         to point to the certificate files. Use the provided
  143. #         Makefile to update the hash symlinks after changes.
  144. #SSLCARevocationPath conf/ssl.crl
  145. #SSLCARevocationFile conf/ssl.crl/ca-bundle.crl
  146.  
  147. #   Client Authentication (Type):
  148. #   Client certificate verification type and depth.  Types are
  149. #   none, optional, require and optional_no_ca.  Depth is a
  150. #   number which specifies how deeply to verify the certificate
  151. #   issuer chain before deciding the certificate is not valid.
  152. #SSLVerifyClient require
  153. #SSLVerifyDepth  10
  154.  
  155. #   Access Control:
  156. #   With SSLRequire you can do per-directory access control based
  157. #   on arbitrary complex boolean expressions containing server
  158. #   variable checks and other lookup directives.  The syntax is a
  159. #   mixture between C and Perl.  See the mod_ssl documentation
  160. #   for more details.
  161. #<Location />
  162. #SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
  163. #            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
  164. #            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
  165. #            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
  166. #            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
  167. #           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
  168. #</Location>
  169.  
  170. #   SSL Engine Options:
  171. #   Set various options for the SSL engine.
  172. #   o FakeBasicAuth:
  173. #     Translate the client X.509 into a Basic Authorisation.  This means that
  174. #     the standard Auth/DBMAuth methods can be used for access control.  The
  175. #     user name is the `one line' version of the client's X.509 certificate.
  176. #     Note that no password is obtained from the user. Every entry in the user
  177. #     file needs this password: `xxj31ZMTZzkVA'.
  178. #   o ExportCertData:
  179. #     This exports two additional environment variables: SSL_CLIENT_CERT and
  180. #     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
  181. #     server (always existing) and the client (only existing when client
  182. #     authentication is used). This can be used to import the certificates
  183. #     into CGI scripts.
  184. #   o StdEnvVars:
  185. #     This exports the standard SSL/TLS related `SSL_*' environment variables.
  186. #     Per default this exportation is switched off for performance reasons,
  187. #     because the extraction step is an expensive operation and is usually
  188. #     useless for serving static content. So one usually enables the
  189. #     exportation for CGI and SSI requests only.
  190. #   o CompatEnvVars:
  191. #     This exports obsolete environment variables for backward compatibility
  192. #     to Apache-SSL 1.x, mod_ssl 2.0.x, Sioux 1.0 and Stronghold 2.x. Use this
  193. #     to provide compatibility to existing CGI scripts.
  194. #   o StrictRequire:
  195. #     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
  196. #     under a "Satisfy any" situation, i.e. when it applies access is denied
  197. #     and no other module can change it.
  198. #   o OptRenegotiate:
  199. #     This enables optimized SSL connection renegotiation handling when SSL
  200. #     directives are used in per-directory context. 
  201. #SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
  202. <Files ~ "\.(cgi|shtml|phtml|php3?)$">
  203.     SSLOptions +StdEnvVars
  204. </Files>
  205. <Directory "O:/apache/cgi">
  206.     SSLOptions +StdEnvVars
  207. </Directory>
  208.  
  209. #   SSL Protocol Adjustments:
  210. #   The safe and default but still SSL/TLS standard compliant shutdown
  211. #   approach is that mod_ssl sends the close notify alert but doesn't wait for
  212. #   the close notify alert from client. When you need a different shutdown
  213. #   approach you can use one of the following variables:
  214. #   o ssl-unclean-shutdown:
  215. #     This forces an unclean shutdown when the connection is closed, i.e. no
  216. #     SSL close notify alert is send or allowed to received.  This violates
  217. #     the SSL/TLS standard but is needed for some brain-dead browsers. Use
  218. #     this when you receive I/O errors because of the standard approach where
  219. #     mod_ssl sends the close notify alert.
  220. #   o ssl-accurate-shutdown:
  221. #     This forces an accurate shutdown when the connection is closed, i.e. a
  222. #     SSL close notify alert is send and mod_ssl waits for the close notify
  223. #     alert of the client. This is 100% SSL/TLS standard compliant, but in
  224. #     practice often causes hanging connections with brain-dead browsers. Use
  225. #     this only for browsers where you know that their SSL implementation
  226. #     works correctly. 
  227. #   Notice: Most problems of broken clients are also related to the HTTP
  228. #   keep-alive facility, so you usually additionally want to disable
  229. #   keep-alive for those clients, too. Use variable "nokeepalive" for this.
  230. #   Similarly, one has to force some clients to use HTTP/1.0 to workaround
  231. #   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
  232. #   "force-response-1.0" for this.
  233. SetEnvIf User-Agent ".*MSIE.*" \
  234.          nokeepalive ssl-unclean-shutdown \
  235.          downgrade-1.0 force-response-1.0
  236.  
  237. #   Per-Server Logging:
  238. #   The home of a custom SSL log file. Use this when you want a
  239. #   compact non-error SSL logfile on a virtual host basis.
  240. CustomLog logs/ssl_request_log \
  241.           "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
  242.  
  243. </VirtualHost>                                  
  244.  
  245. </IfDefine>
  246.